list1=[1,2,3,4,5]
print("初始列表",list1)
list1.append(6)
print("添加6后",list1)
list1.remove(3)
print ("删除3后",list1)
list1[1]=8
print ("修改第二个元素为8后",list1)
index=list1.index(8)
print("8的元素索引",index)
print("遍历列表元素:")
for item in list1:
     print(item,end=" ")
print()
new_list1=[7,8,9]
for num in new_list1:
    list1.append(num)
print ("添加789后",list1)
new_list2=[10,11,12]
list1.extend(new_list2)
print("添加【10.11.12】后",list1)
slice_result = list1[2:5]
print("第三到五个元素",slice_result)
del list1[2]
list1.insert(2,13)
list1.insert(3,14)
print("修改后",list1)
